/**
 * The base stage interface that all plugin components are REQUIRED to implement.
 */
jsx3.lang.Class.defineInterface("ux.cdb.admin.AdminStage", null,
  function(stage) {
    
        stage.instance = null;

        stage.getInstance = function(args) {
            if(!this.instance) {
                this.instance = new stage();
            }
            return this.instance;
        };

        stage.prototype.getTabText = jsx3.lang.Method.newAbstract();

        stage.prototype.getNamespace = jsx3.lang.Method.newAbstract();

        stage.prototype.getComponentUIPath = jsx3.lang.Method.newAbstract();

        stage.prototype.loadComponent = function(parent) {
            ux.megatron.Main.loadUIResourceAsync(parent, this.getNamespace(), 
                this.getComponentUIPath(), this, this.componentLoaded);
        };

        stage.prototype.componentLoaded = function(objEvent) {
            if (objEvent.status == "SUCCESS") {
                // TODO: put code what you want do after below.
            }
            else {
                if (objEvent.exception) {
                    ux.megatron.Main.logException(objEvent.exception, objEvent.message);
                }
                else {
                    jsx3.log(objEvent.message);
                }
            }
        };
        
        
    }
);





